/**
 * 获取进程标识
 * gcc -g -rdynamic -I include    -O0 -Wall  -o obj/progress_id src/progress_id.c
 * sudo chown root.root obj/progress_id
 * sudo chmod u+s obj/progress_id
 * obj/progress_id
*/

#include <stdio.h>
#include <stdlib.h>

#include <sys/types.h>
#include <unistd.h>

int main()
{

    printf("process id %d\n", getpid());
    printf("process parent id %d\n", getppid());

    printf("process group id %d\n", getpgrp());
    printf("process group id %d\n", getpgid(getpid()));

    printf("process real user id %d\n",getuid());
    printf("process effective user id %d\n",geteuid());
    printf("process user group id %d\n",getgid());

    return 0;
}